package cn.wgx.web;


import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("/api/config")
public class DefaultCtrl {

    @Value("${apiPort:0}")
    private Integer port = 0;

    @GetMapping("getPort")
    public Map get(){
        HashMap hashMap = new HashMap();
        hashMap.put("data", port);
        return hashMap;
    }

}
